//
//  SpatialSearchPolygonHelper.m
//  dataGathering
//
//  Created by apple on 14/12/23.
//  Copyright (c) 2014年 shuili. All rights reserved.
//

#import "SpatialSearchPolygonHelper.h"
#import "currentWorkSetManager.h"

@implementation SpatialSearchPolygonHelper

+(NSArray*)searchTouchedGeometryUsing:(AGSGeometry*)geometry1
{
    NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:10];
    
    NSArray *dataArray = [[[currentWorkSetManager sharedInstance] getCurrentWorkSet] collectedDataList];
    
    for(collectedData *d in dataArray){
        if([[AGSGeometryEngine defaultGeometryEngine] geometry:geometry1 intersectsGeometry:[d geometry]]){
            [array addObject:d];
        }
    }
    
    return array;
}

@end
